package book_management.operation.impl;

import book_management.book.BookList;
import book_management.operation.IOperation;

public class RemoveOperation implements IOperation {
    @Override
    public void work(BookList bookList) {
        System.out.println("您现在进行的是书籍的下架操作~");
        System.out.println("请输入您要下架的书籍名称:");
        String booksName = scanner.next();
        if (bookList.isContains(booksName)) {
            // 具体的下架操作
            bookList.bookUndercarriage(booksName);
            System.out.println("书籍下架成功~");
        }else {
            System.err.println("该书就不在图书馆中，无法下架");
        }
    }
}
